<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>商家中心</title>
    <link href="__PUBLIC__/home/css/base.css" rel="stylesheet" type="text/css">
    <link href="__PUBLIC__/home/css/seller_center.css" rel="stylesheet" type="text/css">
    <link href="__PUBLIC__/home/font/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
    <link rel="shortcut icon" type="image/x-icon" href="/public/images/favicon.ico" media="screen"/>
    <!--[if IE 7]>
    <link rel="stylesheet" href="__PUBLIC__/home/font/font-awesome/css/font-awesome-ie7.min.css">
    <![endif]-->
    <script type="text/javascript" src="__PUBLIC__/home/js/jquery.js"></script>
    <script type="text/javascript" src="__PUBLIC__/home/js/seller.js"></script>
    <script type="text/javascript" src="__PUBLIC__/home/js/waypoints.js"></script>
    <script type="text/javascript" src="__PUBLIC__/home/js/jquery-ui/jquery-ui.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/home/js/jquery.validation.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/home/js/layer/layer.js"></script>
    <script type="text/javascript" src="__PUBLIC__/home/js/global.js"></script>
    <script type="text/javascript" src="__PUBLIC__/home/js/myAjax.js"></script>
    <script type="text/javascript" src="__PUBLIC__/home/js/myFormValidate.js"></script>
    <script type="text/javascript" src="__PUBLIC__/home/js/layer/laydate/laydate.js"></script>
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <!--<script src="__PUBLIC__/home/public/static/js/html5shiv.js"></script>-->
    <!--<script src="__PUBLIC__/home/public/static/js/respond.min.js"></script>-->
    <![endif]-->
</head>
<body>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<header class="ncsc-head-layout w">
    <div class="wrapper">
        <div class="ncsc-admin w252">
            <dl class="ncsc-admin-info">
                <dt class="admin-avatar"><img src="__PUBLIC__/home/public/static/images/seller/default_user_portrait.gif" width="32" class="pngFix" alt=""/></dt>
            </dl>
            <div class="ncsc-admin-function">

                <div class="index-search-container">
                    <p class="admin-name"><a class="seller_name" href="">seller</a></p>

                </div>

                <a class="iconshop" href="/index.php/Home/Store/index/store_id/1.html" title="前往店铺" ><i class="icon-home"></i>&nbsp;店铺</a>
                <a class="iconshop" href="/index.php/seller/Admin/admin_info/seller_id/1.html" title="修改密码" target="_blank"><i class="icon-wrench"></i>&nbsp;设置</a>
                <a class="iconshop" href="/index.php/seller/Admin/logout.html" title="安全退出"><i class="icon-signout"></i>&nbsp;退出</a></div>
        </div>
        <div class="center-logo"> <a href="/" target="_blank">
            <img src="/public/static/images/seller/seller_center_logo.png" class="pngFix" alt=""/></a>
            <h1>商家中心</h1>
        </div>
        <nav class="ncsc-nav">
            <dl >
                <dt><a href="/index.php/seller/Index/index.html">首页</a></dt>
                <dd class="arrow"></dd>
            </dl>

            <dl >
                <dt><a href="/index.php?m=Seller&c=Goods&a=addEditGoods">商品</a></dt>
                <dd>
                    <ul>
                        <li> <a href='/index.php/seller/Goods/addEditGoods.html'> 商品发布 </a> </li>
                        <li> <a href='/index.php/seller/Goods/goodsList.html'> 出售中的商品 </a> </li>
                        <li> <a href='/index.php/seller/Goods/goods_offline.html'> 仓库中的商品 </a> </li>
                        <li> <a href='/index.php/seller/Goods/stock_list.html'> 库存日志 </a> </li>
                        <li> <a href='/index.php/seller/Goods/specList.html'> 商品规格 </a> </li>
                        <li> <a href='/index.php/seller/Goods/brandList.html'> 品牌申请 </a> </li>
                    </ul>
                </dd>
                <dd class="arrow"></dd>
            </dl>
            <dl >
                <dt><a href="/index.php?m=Seller&c=Order&a=index">订单物流</a></dt>
                <dd>
                    <ul>
                        <li> <a href='/index.php/seller/Order/index.html'> 订单列表 </a> </li>
                        <li> <a href='/index.php/seller/Order/virtual_list.html'> 虚拟订单 </a> </li>
                        <li> <a href='/index.php/seller/Order/delivery_list.html'> 发货商品 </a> </li>
                        <li> <a href='/index.php/seller/Plugin/index.html'> 发货设置 </a> </li>
                        <li> <a href='/index.php/seller/Comment/index.html'> 商品评论 </a> </li>
                    </ul>
                </dd>
                <dd class="arrow"></dd>
            </dl>
            <dl >
                <dt><a href="/index.php?m=Seller&c=Promotion&a=flash_sale">促销</a></dt>
                <dd>
                    <ul>
                        <li> <a href='/index.php/seller/Promotion/flash_sale.html'> 抢购管理 </a> </li>
                        <li> <a href='/index.php/seller/Promotion/group_buy_list.html'> 团购管理 </a> </li>
                        <li> <a href='/index.php/seller/Promotion/prom_goods_list.html'> 商品促销 </a> </li>
                        <li> <a href='/index.php/seller/Promotion/prom_order_list.html'> 订单促销 </a> </li>
                        <li> <a href='/index.php/seller/Coupon/index.html'> 代金券管理 </a> </li>
                    </ul>
                </dd>
                <dd class="arrow"></dd>
            </dl>
            <dl >
                <dt><a href="/index.php?m=Seller&c=Store&a=store_setting">店铺</a></dt>
                <dd>
                    <ul>
                        <li> <a href='/index.php/seller/Store/store_setting.html'> 店铺设置 </a> </li>
                        <li> <a href='/index.php/seller/Store/store_decoration.html'> 店铺装修 </a> </li>
                        <li> <a href='/index.php/seller/Store/navigation_list.html'> 店铺导航 </a> </li>
                        <li> <a href='/index.php/seller/Store/bind_class_list.html'> 经营类目 </a> </li>
                        <li> <a href='/index.php/seller/Store/store_info.html'> 店铺信息 </a> </li>
                        <li> <a href='/index.php/seller/Store/goods_class.html'> 店铺分类 </a> </li>
                        <li> <a href='/index.php/seller/Store/suppliers_list.html'> 供货商 </a> </li>
                        <li> <a href='/index.php/seller/Store/store_collect.html'> 店铺关注 </a> </li>
                    </ul>
                </dd>
                <dd class="arrow"></dd>
            </dl>
            <dl >
                <dt><a href="/index.php?m=Seller&c=Service&a=ask_list">售后服务</a></dt>
                <dd>
                    <ul>
                        <li> <a href='/index.php/seller/Service/ask_list.html'> 咨询管理 </a> </li>
                        <li> <a href='/index.php/seller/Service/return_list.html'> 退货换货 </a> </li>
                        <li> <a href='/index.php/seller/Service/complain_list.html'> 投诉管理 </a> </li>
                    </ul>
                </dd>
                <dd class="arrow"></dd>
            </dl>
            <dl >
                <dt><a href="/index.php?m=Seller&c=Finance&a=withdrawals">统计结算</a></dt>
                <dd>
                    <ul>
                        <li> <a href='/index.php/seller/Finance/withdrawals.html'> 提现申请 </a> </li>
                        <li> <a href='/index.php/seller/Finance/remittance.html'> 汇款列表 </a> </li>
                        <li> <a href='/index.php/seller/Finance/order_statis.html'> 店铺结算记录 </a> </li>
                        <li> <a href='/index.php/seller/Finance/order_no_statis.html'> 未结算订单 </a> </li>
                        <li> <a href='/index.php/seller/Report/index.html'> 店铺概况 </a> </li>
                        <li> <a href='/index.php/seller/Report/finance.html'> 运营报告 </a> </li>
                        <li> <a href='/index.php/seller/Report/saleTop.html'> 销售排行 </a> </li>
                    </ul>
                </dd>
                <dd class="arrow"></dd>
            </dl>
            <dl >
                <dt><a href="/index.php?m=Seller&c=Index&a=store_service">客服消息</a></dt>
                <dd>
                    <ul>
                        <li> <a href='/index.php/seller/Index/store_service.html'> 客服设置 </a> </li>
                        <li> <a href='/index.php/seller/Index/store_msg.html'> 系统消息 </a> </li>
                    </ul>
                </dd>
                <dd class="arrow"></dd>
            </dl>
            <dl >
                <dt><a href="/index.php?m=Seller&c=Admin&a=index">账号</a></dt>
                <dd>
                    <ul>
                        <li> <a href='/index.php/seller/Admin/index.html'> 账号列表 </a> </li>
                        <li> <a href='/index.php/seller/Admin/role.html'> 账号组 </a> </li>
                        <li> <a href='/index.php/seller/Admin/log.html'> 账号日志 </a> </li>
                    </ul>
                </dd>
                <dd class="arrow"></dd>
            </dl>
            <dl >
                <dt><a href="/index.php?m=Seller&c=Distribut&a=goods_list">分销</a></dt>
                <dd>
                    <ul>
                        <li> <a href='/index.php/seller/Distribut/goods_list.html'> 分销商品 </a> </li>
                        <li> <a href='/index.php/seller/Distribut/distribut.html'> 分销设置 </a> </li>
                        <li> <a href='/index.php/seller/Distribut/rebate_log.html'> 分成记录 </a> </li>
                    </ul>
                </dd>
                <dd class="arrow"></dd>
            </dl>
        </nav>
    </div>
</header>
<div class="ncsc-layout wrapper">
    <div id="layoutLeft" class="ncsc-layout-left">
        <div id="sidebar" class="sidebar">
            <div class="column-title" id="main-nav"><span class="ico-store"></span>
                <h2>店铺</h2>
            </div>
            <div class="column-menu">
                <ul id="seller_center_left_menu">
                    <li class="">
                        <a href="/index.php/seller/Store/store_setting.html"> 店铺设置</a>
                    </li>
                    <li class="">
                        <a href="/index.php/seller/Store/store_decoration.html"> 店铺装修</a>
                    </li>
                    <li class="">
                        <a href="/index.php/seller/Store/navigation_list.html"> 店铺导航</a>
                    </li>
                    <li class="">
                        <a href="/index.php/seller/Store/bind_class_list.html"> 经营类目</a>
                    </li>
                    <li class="">
                        <a href="/index.php/seller/Store/store_info.html"> 店铺信息</a>
                    </li>
                    <li class="current">
                        <a href="/index.php/seller/Store/goods_class.html"> 店铺分类</a>
                    </li>
                    <li class="">
                        <a href="/index.php/seller/Store/suppliers_list.html"> 供货商</a>
                    </li>
                    <li class="">
                        <a href="/index.php/seller/Store/store_collect.html"> 店铺关注</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <div id="layoutRight" class="ncsc-layout-right">
        <div class="ncsc-path"><i class="icon-desktop"></i>商家管理中心<i class="icon-angle-right"></i>店铺<i class="icon-angle-right"></i>店铺分类</div>
        <div class="main-content" id="mainContent">

            <div class="tabmenu">
                <ul class="tab pngFix">
                    <li class="active"><a  href="">店铺分类</a></li></ul>
                <a href="javascript:void(0)" class="ncbtn ncbtn-mint" data-url="?s=/ShopCate/form.html">新增分类</a></div>
            <table class="ncsc-default-table" id="my_category">
                <thead>
                <tr nc_type="table_header">
                    <!--<th class="w30"></th>-->
                    <th coltype="editable" column="stc_name" checker="check_required" inputwidth="50%">分类名称</th>
                    <th class="w60" coltype="editable" column="stc_sort" checker="check_max" inputwidth="30px">排序</th>
                    <th class="w120" coltype="switchable" column="stc_state" checker="" onclass="showclass-ico-btn" offclass="noshowclass-ico-btn">显示</th>
                    <th class="w100">操作</th>
                </tr>
                </thead>
                <tbody id="treet1">
                <foreach name="list" item="val" >
                <tr class="bd-line" nc_type="table_item" idvalue="1">
                    <!--<td class="tc"><input type="checkbox" class="checkitem" name="category[]" value="21"></td>-->
                    <td class="tl">
                        <!--<img src="/public/static/images/tv-collapsable.gif" class="parimg" id="treet11">-->
                        <span  style="color: #014ccc" class="ml5" nc_type="editobj">{$val['cat_name']}</span>
                        <span class="add_ico_a">
                            <a class="ncbtn son"
                               data-id="{$val['id']}"
                               data-url="?s=/ShopCate/form/id/{$val['id']}.html"
                               href="javascript:;"
                               onclick="go_class_info(this)">
                                新增下级
                            </a>
                        </span>
                    </td>
                    <td><span nc_type="editobj">{$val['id']}</span></td>
                    <td> 是  </td>
                    <td class="nscs-table-handle">
	        <span>
                <a href="javascript:void(0)"
                   data-url="?s=/ShopCate/editForm/pid/{$val['pid']}/nid/{$val['id']}.html"
                   href="javascript:;"
                   onclick="go_class_info(this)"
                   class="btn-bluejeans edit">
                    <i class="icon-edit"></i>
	            <p>编辑</p>
                </a>
            </span>
                        <span>
                            <!--<a href="javascript:void(0)" href="javascript:void(0)" data-url="/index.php/seller/Store/goods_class_save.html" data-id="21" onclick="delfun(this)" class="btn-grapefruit"><i class="icon-trash"></i>-->
	        <!--<p>删除</p></a>-->
                <a href="javascript:void(0)"
                   val="{:U('del',array('id'=>$val['id']))}"
                   data-id="{$val['id']}"
                   class="btn-grapefruit">
                    <i class="icon-trash"></i>
	                <p>删除</p>
                </a>
                        </span>
                    </td>
                </tr>


                <if condition="is_array($val['son'])">
                    <foreach name="val.son" item="va">
                        <tr class="bd-line" nc_type="table_item" idvalue="1">
                            <td class="tl">
                                <!--<img src="/public/static/images/tv-collapsable.gif" class="parimg" id="treet11">-->
                                <span style="color: darkseagreen" class="ml5" nc_type="editobj">&nbsp;&nbsp;├─&nbsp;{$va['cat_name']}</span>
                                <span class="add_ico_a">
                                    <a class="ncbtn son"
                                       data-id="{$va['id']}"
                                       data-url="?s=/ShopCate/form/id/{$va['id']}.html"
                                       href="javascript:;"
                                       onclick="go_class_info(this)">
                                新增下级
                            </a>
                                </span>
                            </td>
                            <td><span nc_type="editobj">{$va['id']}</span></td>
                            <td> 是  </td>
                            <td class="nscs-table-handle">
	        <span>
                <a href="javascript:void(0)"
                   data-url="?s=/ShopCate/editForm/pid/{$va['pid']}/nid/{$va['id']}.html"
                   href="javascript:;"
                   onclick="go_class_info(this)"
                   class="btn-bluejeans edit">
                    <i class="icon-edit"></i>
	            <p>编辑</p>
                </a>
            </span>
                                <span>
                                    <!--<a href="javascript:void(0)" data-url="/index.php/seller/Store/goods_class_save.html" data-id="21" onclick="delfun(this)" class="btn-grapefruit"><i class="icon-trash"></i>-->
	        <!--<p>删除</p></a>-->
                <a href="javascript:void(0)"
                   val="{:U('del',array('id'=>$va['id']))}"
                   data-id="{$va['id']}"
                   class="btn-grapefruit">
                    <i class="icon-trash"></i>
	                <p>删除</p>
                </a>
                                </span>
                            </td>
                        </tr>

                        <if condition="is_array($va['son'])">
                            <foreach name="va.son" item="v">
                                <tr class="bd-line" nc_type="table_item" idvalue="1">
                                    <td class="tl">
                                        <!--<img src="/public/static/images/tv-collapsable.gif" class="parimg" id="treet11">-->
                                        <span class="ml5" style="color: lightpink" nc_type="editobj">
                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└─&nbsp;{$v['cat_name']}
                                        </span>
                                    </td>
                                    <td><span nc_type="editobj">{$v['id']}</span></td>
                                    <td> 是  </td>
                                    <td class="nscs-table-handle">
	        <span>
                <a href="javascript:void(0)"
                   data-url="?s=/ShopCate/editForm/pid/{$v['pid']}/nid/{$v['id']}.html"
                   href="javascript:;"
                   onclick="go_class_info(this)"
                   class="btn-bluejeans edit">
                    <i class="icon-edit"></i>
	            <p>编辑</p>
                </a>
            </span>
            <span>
                <a href="javascript:void(0)"
                   val="{:U('del',array('id'=>$v['id']))}"
                   data-id="{$v['id']}"
                   class="btn-grapefruit">
                    <i class="icon-trash"></i>
	                <p>删除</p>
                </a>
            </span>
                                    </td>
                                </tr>
                            </foreach>
                        </if>


                    </foreach>

                </if>

                </foreach>
                </tbody>
            </table>
        </div>
    </div>
</div>
<div id="cti">
    <div class="wrapper">
        <ul>
        </ul>
    </div>
</div>
<div id="faq">
    <div class="wrapper">
    </div>
</div>

<div id="footer">
    <p><a href="/">首页</a>
        | <a  href="http://www.tpshop.cn">招聘英才</a>
        | <a  href="http://www.tpshop.cn">合作及洽谈</a>
        | <a  href="http://www.tpshop.cn">联系我们</a>
        | <a  href="http://www.tpshop.cn">关于我们</a>
        | <a  href="http://www.tpshop.cn">物流自取</a>
        | <a  href="http://www.tpshop.cn">友情链接</a>
    </p>
    Copyright 2017 <a href="" target="_blank">TPshop商城</a> All rights reserved.<br />本演示来源于
    <a href="http://www.tpshop.cn" target="_blank">www.tpshop.cn</a>
</div>
<script type="text/javascript" src="js/jquery.cookie.js"></script>
<link href="__PUBLIC__/home/css/perfect-scrollbar.min.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="js/qtip/jquery.qtip.min.js"></script>
<link href="__PUBLIC__/home/js/qtip/jquery.qtip.min.css" rel="stylesheet" type="text/css">
<div id="tbox">
    <div class="btn" id="msg"><a href="/index.php/Seller/index/store_msg.html"><i class="msg"><em>1</em></i>站内消息</a></div>
    <div class="btn" id="im"><i class="im"><em id="new_msg" style="display:none;"></em></i><a href="javascript:void(0);">在线联系</a></div>
    <div class="btn" id="gotop" style="display: block;"><i class="top"></i><a href="javascript:void(0);">返回顶部</a></div>
</div>
<script type="text/javascript">
    var current_control = 'Store/goods_class';
    $(document).ready(function(){
        //浮动导航  waypoints.js
        $("#sidebar,#mainContent").waypoint(function(event, direction) {
            $(this).parent().toggleClass('sticky', direction === "down");
            event.stopPropagation();
        });
    });
    // 搜索商品不能为空
    $('input[nctype="search_submit"]').click(function(){
        if ($('input[nctype="search_text"]').val() == '') {
            return false;
        }
    });

    function fade() {
        $("img[rel='lazy']").each(function () {
            var $scroTop = $(this).offset();
            if ($scroTop.top <= $(window).scrollTop() + $(window).height()) {
                $(this).hide();
                $(this).attr("src", $(this).attr("data-url"));
                $(this).removeAttr("rel");
                $(this).removeAttr("name");
                $(this).fadeIn(500);
            }
        });
    }
    if($("img[rel='lazy']").length > 0) {
        $(window).scroll(function () {
            fade();
        });
    };
    fade();

//    function delfunc(obj){
//        layer.confirm('确认删除？', {
//                btn: ['确定','取消'] //按钮
//            }, function(){
//                // 确定
//                $.ajax({
//                    type : 'post',
//                    url : $(obj).attr('val'),
//                    data : {act:'del',del_id:$(obj).attr('data-id')},
//                    dataType : 'json',
//                    success : function(data){
//                        layer.closeAll();
//                        if(data==1){
//                            layer.msg('操作成功', {icon: 1});
//                            $(obj).parent().parent().parent().remove();
//                        }else{
//                            layer.msg(data, {icon: 2,time: 2000});
//                        }
//                    }
//                })
//            }, function(index){
//                layer.close(index);
//                return false;// 取消
//            }
//        );
//    }
</script>
<script type="text/javascript">

    $('.btn-grapefruit').on('click',function (obj) {
        var dataId = $(this).attr("data-id");
        var url = $(this).attr('val');
        var tr= $(this).parent().parent().parent();
        layConfirm('确认删除?' , function(){
            $.ajax({
                type : 'post',
                url  : url,
                data : {id:dataId},
                dataType : 'json',
                success : function(data){
                    if(data.res ==1){
                      //  window.location.reload();
                        layer.msg(data.msg, {icon: 1});
                        tr.remove();
                    }else{
                        layer.alert(data.msg, {icon: 2});  //alert(data);
                    }
                }
            });
        });
    });


    $('.ncbtn-mint').on('click',function (obj) {
        var url = $(this).attr("data-url");

        layer.open({
            type: 2,
            title: '添加分类',
            shadeClose: true,
            shade: 0.2,
            area: ['24%', '50%'],
            skin: 'layui-layer-rim',
            content: [url,'no'],
        });
    });

    $('.son').on('click',function (obj) {
        var url = $(this).attr("data-url");

        layer.open({
            type: 2,
            title: '添加分类',
            shadeClose: true,
            shade: 0.2,
            area: ['24%', '50%'],
            skin: 'layui-layer-rim',
            content: [url,'no'],
        });
    });

    $('.edit').on('click',function (obj) {
        var url = $(this).attr("data-url");

        layer.open({
            type: 2,
            title: '编辑分类',
            shadeClose: true,
            shade: 0.2,
            area: ['24%', '50%'],
            skin: 'layui-layer-rim',
            content: [url,'no'],
        });
    });

    /*function go_class_info(o){
            var url = $(o).attr('data-url');
            layer.open({
                type: 2,
                title: '编辑分类',
                shadeClose: true,
                shade: 0.2,
                area: ['24%', '50%'],
                skin: 'layui-layer-rim',
                content: [url,'yes'],
            });
        }*/
   // 回调函数
    function call_back(msg){
        if(msg>0){
            layer.msg('操作成功', {icon: 1});
            layer.closeAll('iframe');
            window.location.reload();
        }else{
            layer.msg('操作失败', {icon: 3});
            layer.closeAll('iframe');
        }
    }
</script>
</body>
</html>
